import logging
import time
from driver_server import VSRController

def run_service():
    logging.basicConfig(level=logging.DEBUG)
    controller = VSRController(simulate=True)
    
    try:
        controller.connect()
        # 保持主线程运行
        while True:
            time.sleep(1)
    
    except KeyboardInterrupt:
        controller.stop()
        logging.info("Service stopped gracefully.")
        

if __name__ == "__main__":
    run_service()

